import { _decorator, Component, director, Node } from 'cc';
const { ccclass, property } = _decorator;

import Store from "../store/Store";
import NetMgr from "../net/NetMgr";

@ccclass('HallMgr')
export default class HallMgr extends Component {
    start() {

    }

    /**
     * 快速开始按钮点击事件
     */
    async onQuickStartBtnClickEvent() {
        console.log('onQuickStartBtnClickEvent')
        console.log(Store.user)
        console.log("-----------------------")
        // 请求加入房间
        const { room, index } = await NetMgr.joinRoom(Store.user)
        console.log('room:', room)
        // // 保存房间数据
        Store.room = room
        Store.index = index
        // 切换场景
        director.loadScene('room')
    }

}


